var storage={
    set:function(key,value){
        localStorage.setItem(key,JSON.stringify(value));
    },
    get:function(key){
        return JSON.parse(localStorage.getItem(key));
    },
    hasCollectData:function(aid,bid,CollectData){
        for(var i=0;i<CollectData.length;i++){
            if(aid==CollectData[i].aid && bid==CollectData[i].bid){
                return true;
            }
        }
        return false;
    },
    deleteCollectData:function(aid,bid,CollectData){
        for(var i=0;i<CollectData.length;i++){
            if(aid==CollectData[i].aid && bid==CollectData[i].bid){
                CollectData.splice(i,1);
            }
             
        }
        return CollectData;
    }
}

export default storage;